/**
 * @author:linjiye
 * @date: 2024/12/26
 * @desc:
 **/

import {StyleSheet, Text, TouchableOpacity, View} from 'react-native'
import React from 'react'
import {useRouter} from "expo-router";

type Props = {
    color: string,
    fontSize: number
}

const PageTopBackBtn = ({color = 'rgba(0,0,0,0.9)', fontSize = 24}: Props) => {
    const router = useRouter();
    return (
        <View style={styles.container}>
            <TouchableOpacity onPress={() => router.back()} style={{paddingHorizontal: 5,marginHorizontal: 5}}>
                <Text style={{fontFamily: 'FcIconFont', fontSize: fontSize, color: color}}>&#xe659;</Text>
            </TouchableOpacity>
        </View>
    )
}

export default PageTopBackBtn

const styles = StyleSheet.create({
    container: {
        position: "relative",
        zIndex: 10000
    },
})